Route

Entity-Related Operation Statement

Syntax samples

ROUTE <expression>

ROUTE 2

ROUTE Attr1

ROUTE Dist1()

Description

Immediately executes a routing block for the processing entity before finishing any remaining processing logic. The process does not continue until all of the entities being routed for the particular block have begun executing their move logic and pass control back to the process (see"ghost" etntity reference below). The processing logic may contain several ROUTE statements. These statements may be selected individually using IF...THEN statements, or they may be processed sequentially, with or without other process statements in between. If any ROUTE statement appears in a process logic, then ProModel assumes all routing for that process will be activated by the user and therefore does no automatic routing. If no ROUTE statement appears in the processing logic, then all routing blocks will be executed automatically once processing logic has been completed.

The ROUTE Statement is most often the last statement in the process logic and is used with IF...THEN statements to make routing decisions based on complex logic that is not available through other ProModel features (such as system functions or the User Condition routing rule). ROUTE, if used with IF...THEN properly, will insure that only one of the routing blocks is activated.

This statement can be used to route one or more entities and leave behind a "ghost" entity that will process the remaining logic after the route statement. The "ghost" entity is also referred to as the parent entity. The child entity takes the route specified by the ROUTE statement. If the child entity cannot go to the next location and is blocked, the parent entity is also blocked and will not continue logic execution until the child entity is no longer blocked. For more information, see Entities.

Valid In

The operation column of process edit tables only.

Components

<expression>

The integer result of this expression determines the routing block that the entity will take. The expression is evaluated every time it is encountered, allowing the chosen block to vary during the simulation.

Example

This example illustrates a "nested" probability routing. The initial entity, EntAB, enters Loc1 and ProModel makes a decision based on the user-defined distribution Dist1() whether to route the resulting entities according to Route 1, Route 2, or Route 3. If ProModel chooses Route 1, it sends an EntA 60% of the time, or an EntB 40% of the time, to Loc2. If ProModel chooses Route 2, it sends an EntA 20% of the time, or an EntB 80% of the time, to Loc3. If ProModel chooses Route 3, it sends an EntA 30% of the time, or an EntB 70% of the time, to Loc4.

Process Table

Entity

Location

Operation (min)

ENTAB

Loc1

Route Dist1()

Routing Table

Blk

Output

Destination

Rule

Move Logic

1

EntA

Loc2

.600 1

MOVE FOR 2

EntB

Loc2

.400

MOVE FOR 2

2

EntA

Loc3

.200 1

MOVE FOR 2

EntB

Loc3

.800

MOVE FOR 2

3

EntA

Loc4

.300 1

MOVE FOR 2

EntB

Loc4

.700

MOVE FOR 2

See Also

Routing Rules.